package org.elzat.healthboxgatewayapp.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.List;

@ConfigurationProperties(prefix = "health-box.gateway")
@Data
@ToString
@RefreshScope
public class HealthBoxGatewayConfig {

    private List<Routes> routes;
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Routes {
        private String from;
        private String to;
        private Boolean doFilter;
    }
}
